import 'package:get/get.dart';

import '../../../../../../../utils/httputils/api.dart';
import '../../../../../../../utils/httputils/resultdata.dart';
import '../../../../../../../utils/util.dart';
import 'state.dart';

class Make_instructionLogic extends GetxController {
  final Make_instructionState state = Make_instructionState();

  @override
  void onInit() {
    state.projectId = Get.arguments;
  }
  //js-management/sa-project-instructions-reply/saveDirective




  save() async{
    ResultData response = await Api.saveDirective({'content': state.content, 'directiveId': "", 'projectId': state.projectId,'targetUserIds':[]});

    if(response.isSuccess){
      BrnDialogManager.showSingleButtonDialog(Get.context!,
          showIcon: true, title: "保存成功", label: "确定", onTap: () {
            Get.back();
            Get.back(result: true);
          });
    }
  }
}
